package com.yi.wood.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by moyi on 2019/1/30 13:47
 *
 * @author moyi
 */
@EqualsAndHashCode(callSuper = true)
@ToString
@Data
@Entity
@Table(name = "goods")
public class Goods extends BaseEntity{

    @Column(name = "goods_no",length = 64)
    private String goodsNo;

    @Column(name = "name",length = 50)
    private String name;

    @Column(name = "des", length = 200)
    private String des;

    @Column(name = "amount", columnDefinition = "int(4) comment '库存数量'")
    private Integer amount;

    @Column(name = "main_url", columnDefinition = "varchar(100) comment '第一眼图片'")
    private String mainUrl;

    @Column(name = "des_url", columnDefinition = "varchar(100) comment '商品详细介绍页面'")
    private String desUrl;

    @Column(name = "price")
    private Integer price;

    @Column(name = "old_price")
    private Integer oldPrice;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "update_time")
    private Date updateTime;

    @Column(name = "type",columnDefinition = "int(2) comment '1：普通，2：热销，3：秒杀'")
    private Integer type = 1;

    @Column(name = "sort")
    private Integer sort;

    @Column(name = "status", columnDefinition = "int(2) comment '1：状态'")
    private Integer status = 1;

    @Column(name = "deleted", columnDefinition = "int(2) comment '1: 正常，0：删除'")
    private Integer deleted = 1;

}
